package com.cntcdt.api.db.dao;

import java.util.List;

import com.cntcdt.api.db.dao.base.ConsociationCompanyLinkDaoBase;
import com.cntcdt.api.db.model.ConsociationCompanyLinkModel;
import com.cntcdt.api.db.model.DeviceChargeModel;

/**
 * 这是cdt_consociation_company_link的Dao实现类
 */
public class ConsociationCompanyLinkDao extends ConsociationCompanyLinkDaoBase   {
    /**
     * ConsociationCompanyLinkDao对象
     */
    private static ConsociationCompanyLinkDao instance = new ConsociationCompanyLinkDao();

    /**
     * 默认构造方法
     */
    private ConsociationCompanyLinkDao() {
    }

    /**
     * 获得对象实例
     */
    public static ConsociationCompanyLinkDao getInstance() { 
         return instance;
    } 
    
    /**
     * 按deviceId查询model
     * @param id id
     * @return model
     */
    public List<ConsociationCompanyLinkModel> findByConsociationId(int ConsociationId) {
       String sql = "SELECT * FROM " + TABLE + " WHERE ConsociationId = ?";
       Object[] paramObjs = {ConsociationId};
       List<ConsociationCompanyLinkModel > modelList = this.queryModelList(sql, paramObjs);
       return modelList;
   }    

}
